﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DarkBO.Helpers;
using System.Collections.Specialized;

/// <summary>
///AdminPage 的摘要说明
/// </summary>
public class AdminPage : System.Web.UI.Page
{
	public AdminPage()
	{
        HttpCookie cookie = HttpContext.Current.Request.Cookies["darrenbo"];
        bool hasLogin=false;
        if (cookie == null)
        {
            hasLogin = false;
        }
        else
        {
            try
            {
                string value= SecurityHelper.DiscuzAuthcodeDecode(cookie.Value, "wubingkuidarrenbo");

                hasLogin = true;
            }
            catch (Exception)
            {
                hasLogin = false;
            }
        }

        if (hasLogin == false)
        {
            HttpContext.Current.Response.Redirect("login.aspx");
        }
	}
}